package sfeir.ergosum.myprofile;

import sfeir.ergosum.R;
import sfeir.ergosum.adapter.NetworkListAdapter;
import sfeir.ergosum.model.Contact;
import sfeir.ergosum.model.Person;
import android.app.ListActivity;
import android.os.Bundle;

public class MyProfileNetworkActivity extends ListActivity {

    private static NetworkListAdapter adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Contact contact = (Contact) getIntent().getSerializableExtra("contact");
        Person p = contact.getPerson();
        setContentView(R.layout.contact_network_list);
        adapter = new NetworkListAdapter(this, p);
        setListAdapter(adapter);
    }

    public static void refresh(Person p) {
        adapter.update(p);
    }

}
